package com.HeJing.实例变量赋值过程_JavaBean_UML类图.方法的相关应用.方法的值传递机制剖析;

/**
 * ClassName: ValueTransferTest02
 * Package: com.HeJing.方法的相关应用.方法的值传递机制剖析
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-22 20:12
 * @Version: 1.0
 */
public class ValueTransferTest02 {
    public static void main(String[] args) {

        ValueTransferTest02 test02 = new ValueTransferTest02();

        int m = 10;
        int n = 20;
        System.out.println("m = " + m + "\tn = " + n);
        // 交换两数之值

    }

    public void swap(int m, int n) {
        int temp = m;
        m = n;
        n = temp;
    }
}






















